weight_in_pounds = input('What is your weight in pounds? ')
# weight_in_pounds是一个str，也就是文字
# weight_in_kilograms = weight_in_pounds * 0.45  # TypeError: can't multiply sequence by non-int of type 'float'
# 不可以直接乘以0.45，因为str类型 * float类型会报错，只有数字之间才可以相乘
weight_in_kilograms = float(weight_in_pounds) * 0.45
# 所以用float()函数转换为float类型再进行相乘
print('weight in kliograms is ' + str(weight_in_kilograms))
# 输出为 weight in kliograms is 45.0
print(bool(0), bool(1), bool(''), bool('123'))  # False True False True
print(int("0"), int(1))  # 0 1
print(int('123abs'))  # 报错
# ValueError: invalid literal for int() with base 10: '123abs'
